package com.itheima.pojo;

import com.itheima.entity.ValidateNote;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.NotEmpty;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import java.io.Serializable;

/**
 * 检查项
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CheckItem implements Serializable , ValidateNote {
    private Integer id;//主键
    private String code;//项目编码
    @NotEmpty(message = "项目名称不能为空")
    private String name;//项目名称
    private String sex;//适用性别
    @Min(value = 1,message = "年龄不合法")
    private String age;//适用年龄（范围），例如：20-50
    @Range(min = 1 , max = 9999 , message = "数据不合法")
    private Float price;//价格
    private String type;//检查项类型，分为检查和检验两种类型
    private String remark;//项目说明
    private String attention;//注意事项

}
